Skip to content

Add profiler required gate#3999

Closed
realFlowControl wants to merge 1 commit into
masterfrom
florian/profiler-required-gate
Closed

Add profiler required gate#3999
realFlowControl wants to merge 1 commit into
masterfrom
florian/profiler-required-gate

Conversation

@realFlowControl

Copy link
Copy Markdown
Member

What

Adds a dedicated profiling-required GitHub Actions job that can be referenced from a GitHub ruleset.

The gate runs on every PR, but only enforces profiler-owned checks when the PR touches:

  • profiling/**
  • zend_abstract_interface/**

For unrelated PRs it exits successfully immediately, so the check can safely be made required without relying on path-filtered workflow behavior.

What it validates

For relevant PRs, the job polls the PR head commit until matching checks/statuses are terminal, then fails if any are red:

  • GitHub Actions check runs whose displayed name starts with Profiling , using workflow name / job name so matrix jobs under workflows like Profiling correctness are covered.
  • GitLab statuses matching dd-gitlab/clippy *.
  • GitLab status dd-gitlab/profiling tests.

The gate fails closed if no GitHub Actions Profiling checks appear or if dd-gitlab/profiling tests never appears.

Notes

  • The job name is profiling-required; add that check to the GitHub ruleset after this lands.
  • The workflow polls for up to 6 hours to avoid racing against slow GitHub Actions/GitLab status creation.

@realFlowControl realFlowControl requested a review from a team as a code owner June 18, 2026 11:08
@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Jun 18, 2026

Copy link
Copy Markdown

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 4 Pipeline jobs failed

.github/workflows/profiler-gate.yml | profiling-required   View in Datadog   GitHub Actions

DataDog/apm-reliability/dd-trace-php | test_web_wordpress_59: [8.0, cgi-fcgi]   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-php | ASAN test_c with multiple observers: [8.4]   View in Datadog   GitLab

View all 4 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 4da2fc1 | Docs | Datadog PR Page | Give us feedback!

@realFlowControl realFlowControl deleted the florian/profiler-required-gate branch June 18, 2026 11:09

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4da2fc1bd1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

process.exit(1);
}

const files = await changedFiles();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Wrap the Node script before using await

With the workflow invoking node <<'NODE', this top-level await is evaluated in the same script that uses require('fs'), which is not valid as a plain Node script on current runner Node versions. The job exits before any PR/path logic runs (for example with ERR_AMBIGUOUS_MODULE_SYNTAX), so making profiling-required required would fail every PR instead of only gating profiler paths; wrap the body in an async main/IIFE or make the script a proper ES module.

Useful? React with 👍 / 👎.

}

async function relevantGitLabStatuses() {
const combinedStatus = await requestJson(`${apiBase}/repos/${owner}/${repo}/commits/${headSha}/status`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Page through commit statuses before filtering

The combined-status API response is paginated with a default page size of 30, but this call reads only the first page before filtering for dd-gitlab/profiling tests and clippy contexts. On PR commits with more than 30 status contexts from the GitLab child pipelines and other CI, the relevant GitLab status can be on a later page, causing this gate to wait until the six-hour timeout even though the status was posted; use pagination or at least per_page=100 here as is done for files and check runs.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant